package com.jackson.gson.plugin

import com.jackson.gson.plugin.transform.GsonJarTransform
import org.gradle.api.Plugin
import org.gradle.api.Project;

class GsonPlugin implements Plugin<Project> {

    @Override
    void apply(Project project) {

        // add jitpack repo
        project.repositories.maven {
            url "https://jitpack.io"
        }

        // add dependencies
        project.dependencies.add("api",
                "com.github.LianjiaTech:gson-plugin-sdk:1.0.0")

        // register transform
        project.android.registerTransform(new GsonJarTransform(project))
    }
}